//
//  __4HelloWorldAppDelegate.m
//  3-4HelloWorld
//
//  Created by smu on 11-8-9.
//  Copyright 2011年 duk. All rights reserved.
//

#import "__4HelloWorldAppDelegate.h"
#import <UIKit/UIColor.h>
#import <UIKit/UIFont.h>
#import <UIKit/UITextView.h>

@implementation MainView

- (id)initWithFrame:(CGRect)frame 
{
    self = [super initWithFrame:frame];
    if (self != nil) {
        textView = [[UITextView alloc] initWithFrame:frame];
        textView.text = @"Hello, World!";
        [self addSubview:textView];
    }
    return self;
}

- (void)dealloc
{
    [textView release];
    [super dealloc];
}

@end


@implementation __4HelloWorldAppDelegate


@synthesize window;



- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    CGRect screenBounds = [[UIScreen mainScreen] applicationFrame];
    CGRect windowBounds = screenBounds;
    windowBounds.origin.y = 0.0;
    self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
    myMainView = [[MainView alloc] initWithFrame:windowBounds];
    [window addSubview:myMainView];
    [self.window makeKeyAndVisible];
    return YES;
}



- (void)dealloc
{
    [myMainView release];
    [window release];
    [super dealloc];
}

@end
